package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.domain.SignIn;
import cn.wolfcode.trip.base.service.ISignInService;
import cn.wolfcode.trip.base.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController()
@RequestMapping("/signins")
public class SignInController {
    @Autowired
    private ISignInService signInService;

    @PostMapping("/{id}")
    public Object getSignIns(SignIn signIn){
        JSONResult result = new JSONResult();
        try {
            signInService.saveOrUpdate(signIn);
            result.setObj(signIn);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }

}
